package impl;

import dao.SaveFile;

import java.io.File;

public class SaveFileJava implements SaveFile {
    private String sourceName;
    public SaveFileJava(String sourceName, String sourceText, String inputText){
        this.sourceName=sourceName;
        SaveFileTxt st = new SaveFileTxt(sourceName,sourceText);
        File file1 = new File("D:\\onlineDemo\\" + sourceName + ".txt");
        File file = new File("D:\\onlineDemo\\" + sourceName + ".java");
        file1.renameTo(file);
        saveTxt(inputText);
    }
    public void saveTxt(String inputText){
        SaveFileTxt saveFileTxt = new SaveFileTxt(sourceName, inputText);
    }
}
